package com.zyf.project.kvdb.protocol.constants;

/**
 * <h1>常量类</h1>
 * <p>这里定义了该模块中常用的常量常量</p>
 *
 * @author Zhou Yifan
 */
public class Constants {

    /* 服务器 response 的代码 */

    /**
     * Response 成功
     */
    public static final int SUCCESS = 1;
    /**
     * Response 失败
     */
    public static final int ERROR = 0;

    /* 数据协议的代码 */

    /**
     * KVDB 消息代码
     */
    public static final int MESSAGE = 1;
    /**
     * KVDB 消息体代码
     */
    public static final int MESSAGE_CONTENT = 11;
    public static final int COMMAND = 2;
    public static final int RESPONSE = 3;
    public static final int DATABASE_INFO = 4;
    public static final int CLUSTER_INFO = 5;
    public static final int CLUSTER_ITEM = 6;
    public static final int DATABASE_BASE_INFO = 7;
    public static final int DATABASE_BASE_INFO_LIST = 8;

    public static final int WAL_KV = 100;
    public static final int WAL_ENTITY = 101;
}
